The present invention relates to a database managing device for creating the same contents between parties which are ready to communicate, and particularly to a database managing device capable of reducing the volume of data transmitted or processed during a synchronous process, and the invention also relates to a recording medium recording a program of such a database managing device.
Conventionally, information processing devices have been in wide use, and it is not rare in recent years for one individual to own a plurality of information processing devices, for example, such as a high-performance information processing device like a desk-top personal computer and a portable information processing device like a portable information terminal. When personal information, for example, such as schedules and address book are to be managed by these plurality of information processing devices, there is need to maintain the same contents of data in any of databases provided in these information processing devices. Thus, in the case of managing, for example, personal information between a personal computer and a portable information terminal, a master database is managed by the personal computer and the data of the master database are copied to the database (portable database) of the portable information processing device, thus carrying the personal information.
In this manner, in managing the same data between a plurality of database managing devices, when data is changed in one database managing device, it is required to update the database of all the other database managing devices. Here, if each database managing device is in communications all the time, the change in data is immediately reflected in each one of these devices when the updated database managing device informs the other database managing devices that the data has been changed. However, it is not always the case that each database managing device is in communications all the time with the other devices, for example, as in the case where the database managing device is a portable information terminal. In such a case, a change in data in one device is not reflected in the databases of the other database managing devices at the time when the change is made. Thus, in order to maintain the same database, it is required to carry out a process for creating the same contents in database between parties at the time when communications are engaged between the database managing devices; namely, a synchronous process is required.
In the case of the above example, when data is changed in the portable information terminal, a synchronous process is carried out at the time when the portable information terminal is brought back to home or office, in which time data become the same between the portable database of the portable information terminal and the master database of the computer.
As an example of a conventional synchronous process, upload and download are known. Specifically, when data are changed in the personal computer, the contents of the master database are copied to the portable information terminal (download). On the other hand, when data are changed in the portable information terminal, the contents of the portable database are copied to the personal computer (upload).
Another conventional example is a synchronous process employing a sum of sets. In this synchronous process, the contents of both databases are compared at the time when communications are engaged between the two database managing devices, and a sum of sets, which contains all the information added to each database is created as a new database. Thereafter, the database thus created is stored in the both database managing devices.
For example, when the both databases initially contain data xe2x80x9cAxe2x80x9d, and data xe2x80x9cBxe2x80x9d is added to one database managing device X, and data xe2x80x9cCxe2x80x9d is added to the other database managing device Y, the database managing device X sends its contents xe2x80x9cA+Bxe2x80x9d to the database managing device Y. The database managing device Y creates a sum of sets xe2x80x9cA+B+Cxe2x80x9d from the data xe2x80x9cA+Bxe2x80x9d received and its contents xe2x80x9cA+Cxe2x80x9d and stores the sum of sets as a database. The database managing device Y then sends the contents of the database xe2x80x9cA+B+Cxe2x80x9d back to the database managing device X. As a result, the contents of the database of the database managing device X are updated to xe2x80x9cA+B+Cxe2x80x9d, which are the same as that of the database managing device Y.
However, the conventional database managing device carrying out the described synchronous process has the problem of extremely large data volume (communications volume) transmitted between the database managing devices in the synchronous process and extremely large data volume computed in each database managing device.
Specifically, in download and upload, all the contents of one database are transmitted to the other database managing device regardless of the number of data updated. For example, in the case of a database having the data of 1000 items, the data of all the 1000 items are sent even when only one item is changed. As a result, the communications volume transmitted between the database managing devices is increased. Further, the contents of the database of the database managing device of the receiving end are replaced with the database of the sending end, and thus a change in data on the receiving end is lost.
Also, in the synchronous process employing a sum of sets, in order to create a sum of sets, a database of one party is sent to the other database, and the sum of sets created is sent back as a new database. Thus, in this synchronous process, all the contents of the database are required to be sent back and forth between the database managing devices, which further increases the communications volume in the synchronous process.
Further, in the case where data is deleted only in one of the devices, the data remain in the other device. Thus, the data is included again in a new database and it is not deleted. As a result, the memory space required for storing the database is increased, and the communications volume in the synchronous process is further increased.
In order to solve these problems, another example of the synchronous process is disclosed, for example, in Japanese Unexamined Patent Publication No. 6693/1997 (Tokukaihei 9-6693) (Published Date: Jan. 10, 1997), in which update information indicative of a change or no change in data is given to each data contained in the database. Specifically, each database managing device stores, per each data stored in the database, ID information for identifying the data and update information indicative of no change/correction/addition/deletion, and when data is changed, the update information corresponding to this data is updated. In the synchronous process, ID information and update information of all data are transferred between database managing devices. The database managing device of the receiving end searches through its database data associating with the data changed in the device of the sending end based on the ID information received and compares the update information of the both parties. When data is changed only in one party, unchanged data is replaced with the data changed. When data are changed in the both parties, the data of one party is added to the database of the other party, and vice versa. In this way, in the case where data are not changed in any of the database managing devices, sending of data can be omitted, thus reducing the communications volume in the synchronous process.
However, even with the above arrangement, it is still required to transmit the ID information and update information with respect to the entire database. Further, when change is made in the both parties, the data changed in one party needs to be added to the database of the other party. Thus, the communications volume in the synchronous process is still not reduced to a sufficient level. Further, when data are changed in the both parties, the number of data in the databases is increased, which in turn increases the required memory space for storing the database, and this may result in increase in communications volume in the synchronous process.
The present invention was accomplished in the light of the foregoing problems and it is an object of the present invention to provide a database managing device which requires a less memory space required for storing presence or absence of change, and which is capable of further reducing the data volume transferred and processed during a synchronous process, and also to realize a recording medium storing a program of such a database managing device.
In order to achieve the foregoing object, a database managing device in accordance with the present invention includes: a sharing region associating section for associating a second sharing region of a second database stored in each of a plurality of other database managing devices with a first sharing region of a first database stored in the database managing device; a state information storing section for storing state information indicative of an update state of first data in the non-synchronous period per each combination of the first sharing region and the second sharing region of one of the other database managing devices; and a synchronize processing section for carrying out a synchronous process between the first sharing region and the second sharing region of one of the other database managing devices one at a time based on the state information associated with the first sharing region and the second sharing region so as to find a coincidence of the two sharing regions and for updating the state information relating to the second sharing region and transferring the updated state information to state information associated with other second sharing regions.
With this arrangement, different state information is provided for each of the second databases, and a change in one state information is transferred to other state information, making it possible to carry out the synchronous process among three or more database managing devices even though the synchronous process based on state information is performed only between two database managing devices.
Further, by repeating the synchronous process for each different combination, data can be matched for each combination and the state information is transferred subsequently. Thus, unlike the client/server system, it is not required at all to associate all database managing devices with a specific database managing device (server). As a result, when constructing a database system from database managing devices, less restriction of is imposed on the database system with regard to data association.
Further, associating data are placed in the first sharing region, and data are associated with each other in the unit of sharing regions. Also, the synchronous process is carried out based on the state information. Thus, compared with the synchronous process in which associations are made per data or first and second data are exchanged, data volume transferred between the database managing devices in the synchronous process can be reduced.
Further, in order to achieve the foregoing object, the database managing device in accordance with the present invention includes: a data managing number storing section for storing a data managing number which corresponds to each data contained in the first sharing region; and a data managing number setting section for setting the data managing number, the data managing number setting section setting a data managing number for a combination of a database managing number having a value different from that of any of the other database managing devices and a data number having a different value from that of any other data contained at least in the first sharing region with respect to data newly added in the first sharing region by a process other than the synchronous process, and, with respect to data which was added in the synchronous process, the data managing number setting section setting a data managing number which has already been given to the newly added data in the other database managing device, wherein the synchronize processing section specifies the associating data between the databases based on the data managing number.
With this arrangement, the state information indicative of an update state in a non-synchronous period is stored with respect to the first data contained in the first sharing region even once in the non-synchronous period. Thus, even when the first data was moved in and out of the first sharing region during the non-synchronous period, presence or absence of update can be identified by referring to the state information, making it possible to omit transfer of data which was not updated. Further, since the data managing number storing section and data managing number setting section are provided, a distinct data managing number can be provided regardless of whether the database managing device is in communication with the other database managing device, and the synchronize processing section can identify any association of data with ease by referring to the data managing number. Further, associating data are placed in the first sharing region and data are associated with each other in the unit of sharing regions, and the synchronous process is carried out based on the state information. As a result, it is possible to reduce transferred data volume between database managing devices in the synchronous process.
Further, in order to achieve the foregoing object, the database managing device in accordance with the present invention includes: a moved time storing section or moved number storing section for storing last moved time or last moved number with respect to data which was moved in and out of the first sub-set, and the synchronize processing section decides whether to place other associating data in their respective sub-sets in accordance with more recent last updated time or greater moved number when finding a coincidence between the first sub-set and the second sub-set.
With this arrangement, data are associated with each other in a unit of sub-sets, and when associating data are moved in and out of each sub-set, the data are placed either inside or outside of each sub-set. Thus, even when the synchronous process is carried out after data are moved in and out of the sub-set, increase in number of data can be reduced, thus reducing transferred data volume during the synchronous process.
Further, in order to achieve the foregoing object, the database managing device in accordance with the present invention includes: a state information storing section for storing state information indicative of an update state of the first data in the first sharing region per each combination of the first sharing region and the sharing region (second sharing region) of the other database managing device, and when carrying out the synchronous process to find a coincidence between the first and second sharing regions, the synchronize processing section confirms presence or absence of any update by sending and receiving the state information, and when update is made in a plurality of sharing regions, judges whether the data are the same and decides whether to replace remaining of the associating data with data contents of which party.
With this arrangement, when data are updated in a plurality of sharing regions, after judging whether the data are the same, priority data is selected out from the associating data and remaining data (non-priority data) is replaced with the contents of the priority data. Thus, compared with the case where data are all added as separate data to each database, increase in number of data can be prevented and transferred data volume during the synchronous process can be reduced.
For a fuller understanding of the nature and advantages of the invention, reference should be made to the ensuing detailed description taken in conjunction with the accompanying drawings.